package org.budo.phone.api;

import com.alibaba.fastjson.JSON;

import lombok.Getter;
import lombok.Setter;

/**
 * @author lmw
 */
@Getter
@Setter
public class BudoPhoneEventWrapper implements BudoPhoneEvent {
    private BudoPhoneEvent phoneEvent;

    public BudoPhoneEventWrapper(BudoPhoneEvent phoneEvent) {
        this.setPhoneEvent(phoneEvent);
    }

    @Override
    public Type getType() {
        return this.getPhoneEvent().getType();
    }

    @Override
    public CallState getCallState() {
        return this.getPhoneEvent().getCallState();
    }

    @Override
    public String getCallId() {
        return this.getPhoneEvent().getCallId();
    }


    @Override
    public String getALegCallId() {
        return this.getPhoneEvent().getALegCallId();
    }

    @Override
    public Direction getDirection() {
        return this.getPhoneEvent().getDirection();
    }

    @Override
    public String getSipUser() {
        return this.getPhoneEvent().getSipUser();
    }

    @Override
    public String getPostNumber() {
        return this.getPhoneEvent().getPostNumber();
    }

    @Override
    public String getCustomerNumber() {
        return this.getPhoneEvent().getCustomerNumber();
    }

    @Override
    public String getMerchantNumber() {
        return this.getPhoneEvent().getMerchantNumber();
    }

    @Override
    public String getFromNumber() {
        return this.getPhoneEvent().getFromNumber();
    }

    @Override
    public String getToNumber() {
        return this.getPhoneEvent().getToNumber();
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this.phoneEvent);
    }
}